package c.j.a.d.a.c;

import android.content.Context;
import android.content.Intent;
import android.util.Log;

/* compiled from: AbsDevicePlan */
public abstract class a {
    public final Context a;
    public final String b;

    public a(Context context, String str) {
        this.a = context;
        this.b = str;
    }

    public boolean a() {
        if (this.a == null) {
            return false;
        }
        try {
            if (b().resolveActivity(this.a.getPackageManager()) != null) {
                return true;
            }
        } catch (Throwable th) {
            if (c.j.a.d.b.g.a.b()) {
                Log.e("AbsDevicePlan", "check is valid failed!", th);
            }
        }
        return false;
    }

    public abstract Intent b();
}
